import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import Apis from '@/api/index';  // 加载API，共通常量
import Request from '@/request';  // 加载API，共通常量
import CommonJs from '@/utils/common';  // 加载API，共通方法函数
import Setting from '@/utils/setting';  // 加载API，共通常量
import Store from '@/store';  // 加载Store，共通常量
import './uni.promisify.adaptor'

Vue.config.productionTip = false
Vue.prototype.$Setting = Setting.constant;
Vue.prototype.$store = Store;
Vue.prototype.$Msg = CommonJs.msgToast;
Vue.prototype.$PrePage = CommonJs.prePage;
Vue.prototype.$RouterTo = CommonJs.uNavRouteTo;
Vue.prototype.$PageInit = CommonJs.pageInit;
Vue.prototype.$alUploadImage = CommonJs.alUploadImage;
Vue.prototype.$apiNames = Apis.apiNames;
Vue.prototype.$myHttps = Request.myHttps;
Vue.prototype.$myFormDataHttps = Request.myFormDataHttps;

App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif